import request from "@/utils/request";

//sku列表接口
export const reqSkuList = (page, limit) =>
  request({
    url: `/admin/product/list/${page}/${limit}`,
    method:'get'
  });

//上架接口
export const reqOnSale = (skuId) => request({
  url: `/admin/product/onSale/${skuId}`,
  method:'get'
});

//下架接口
export const reqCanelSale = (skuId) => request({
  url: `/admin/product/cancelSale/${skuId}`,
  method: "get",
});

//查看sku详情
export const reqSkuById = (skuId) =>
  request({
    url: `/admin/product/getSkuById/${skuId}`,
    method:'get'
  });

  //删除sku  /admin/product/deleteSku/{skuId}
  export const reqDeleteSku = (skuId) =>
    request({
      url: `/admin/product/deleteSku/${skuId}`,
      method:'delete'
    });